function objParams(obj) {
	var result = "";
	var item;
	for (item in obj) {
		result += "&" + item + "=" + encodeURIComponent(obj[item]);
	}
	if (result) {
		result = result.slice(1);
	}
	return result;
}

export function post(url, obj) {
	var result = fetch(url, {
		method: "post",
		headers: {
			"Accept": "application/json,text/plain,*/*",
			"Content-Type": "application/x-www-form-urlencoded"
		},
		// {name:iwen,age:20}  fetch要的是:name=iwen&age=20
		body: objParams(obj)
	});
	return result;
}